function graphics_ = gXcohTimeLearn_graphics(varargin)
% 2008 Benjamin Heasly at University of Pennsylvania

if nargin
    settings = varargin{1};
else
    settings.dotDir = [0 180];
end

r = [1 0 0]*16;
g = [0 1 0]*16;
b = [0 0 1]*255;

arg_dXdots = { ...
    'x',            0, ...
    'y',            0, ...
    'diameter',     8, ...
    'size',         3, ...
    'speed',        5, ...
    'coherence',    100, ...
    'direction',    settings.dotDir(1), ...
    'density',      50, ...
    'wrapMode',     'wrap', ...
    'color',        [1 1 1 1]*255, ...
    'bgColor',      [0 0 0]};

arg_dXtarget = { ...
    'y',            0, ...
    'x',            0, ...
    'diameter',     .2, ...
    'diameter2',    {5  2}, ...
    'color',        b};

rad = 5;
x = rad*cosd(settings.dotDir);
y = rad*sind(settings.dotDir);
arg_dXimage = { ...
    'dir',          [], ...
    'file',         'rightArrowTransparent.png', ...
    'useTextures',  true, ...
    'preloadTextures', true, ...
    'x',            num2cell(x), ...
    'y',            num2cell(y), ...
    'color',        {r g}, ...
    'rotationAngle', num2cell(-settings.dotDir)};

% {'group', reuse, set now, set always}
static = {'current', true, true, false};
graphics_ = { ...
    'dXtarget',     2,  static, arg_dXtarget; ...
    'dXdots',       1,  static, arg_dXdots; ...
    'dXimage',      2,  static,	arg_dXimage; ...
    };